

import java.util.ArrayList;
import java.util.List;

public class TreeNode
{

    
    /**
     * id:标识.
     */
    private String id;

    /**
     * deep:层.
     */
    private int deep;

    /**
     * children:子集合.
     */
    public List<TreeNode> children;

    /**
     * parent:父节点.
     */
    private TreeNode parent;

    /**
     * x:坐标.
     */
    private int x;

    /**
     * y:坐标.
     */
    private int y;

    /**
     * type:节点类型.
     */
    private Integer type;
    
    
    
    public TreeNode()
    {
        children = new ArrayList<>();
    }

    public TreeNode(String id, int deep, List<TreeNode> children, TreeNode parent,
            int x, int y)
    {
        super();
        this.id = id;
        this.deep = deep;
        this.children = children;
        this.parent = parent;
        this.x = x;
        this.y = y;
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        this.id = id;
    }

    public int getDeep()
    {
        return deep;
    }

    public void setDeep(int deep)
    {
        this.deep = deep;
    }

    public List<TreeNode> getChildren()
    {
        return children;
    }

    public void setChildren(List<TreeNode> children)
    {
        this.children = children;
    }

    public TreeNode getParent()
    {
        return parent;
    }

    public void setParent(TreeNode parent)
    {
        this.parent = parent;
    }

    public int getX()
    {
        return x;
    }

    public void setX(int x)
    {
        this.x = x;
    }

    public int getY()
    {
        return y;
    }

    public void setY(int y)
    {
        this.y = y;
    }

    public Integer getType()
    {
        return type;
    }

    public void setType(Integer type)
    {
        this.type = type;
    }

    @Override
    public String toString()
    {
        return "TreeNode [id=" + id + ", deep=" + deep + ", children="
                + children + ", parent=" + parent + ", x=" + x + ", y=" + y
                + ", type=" + type + "]";
    }

}
